#!/bin/sh

# Wait for fcitx to startup
for i in $(seq 30); do
  if fcitx-remote &> /dev/null; then
    sogouImeService $@
    echo 'sogouImeService started'
    exit
  else
    sleep 1
  fi
done

echo 'sogouImeService failed to start: fcitx not running'
exit 1
